#coding=utf-8
#!/usr/bin/python

import gevent
from gevent import socket
urls = ['www.google.com','www.163.com']
jobs = [gevent.spawn(socket.gethostbyname,url) for url in urls]
gevent.joinall(jobs,timeout=2)
for job in jobs:
	print job.value